<template>
  <van-row type="flex" justify="space-between" align="center">
    <van-col :span="18">
      <van-row type="flex" align="center">
        <van-col :span="5"><img src="@/assets/images/img_avatar6.png" style="width:45px" alt=""></van-col>
        <van-col :span="18" class="L-margin-left-5">
          <div class="L-big-text L-bold-text">{{item.contact_sname}}</div>
          <div v-if="item.tags"><span v-html="item.tags"></span></div>
        </van-col>
      </van-row>
    </van-col>
    <van-col :span="6" style="text-align: right;">
      <van-tag color="#ecf6ff" text-color="#3880ca" size="large" round>{{item.contact_ysdj_enum}}</van-tag>
    </van-col>
  </van-row>
  <template v-if="item.label">
    <van-divider />
    <div v-html="item.label" class="L-secondary-text-color"></div>
    <van-divider />
  </template>

  <van-row type="flex" justify="space-between" align="center">
    <van-col><span class="L-small-text">负责人 {{item.contact_idowner_ref}}</span></van-col>
    <van-col>
      <van-button @click="toCard(item)" round size="small" color="#1683f7" style="width:80px">查看详情</van-button>
    </van-col>
  </van-row>

</template>

<script setup lang="ts">
import { onMounted, ref,defineProps} from "vue";
import {useRouter,useRoute} from "vue-router"
const router = useRouter()

const props = defineProps({
  
  item:{
    type:Object,
    default:{}
  },

  idobject:{
    type:String,
    default:""
  }

});

function toCard(){
  const {item,idobject} = props
  router.push({
    path:"/contactCard",
    query:{
      itemid:item[`${idobject}_id`],
      idobject
    }
  })

}
</script>

<style scoped>
</style>